﻿using System;
using System.Collections.Generic;
 
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class per_get_p : MpageBase
{
    protected Model.CMember cmember = null;
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void midifyBtn_Click(object sender, EventArgs e)
    {

        if(loginUserInfo!=null&&loginUserInfo.Id>0){
            cmember = BLL.CMember.GetModel(loginUserInfo.Id);
            if (cmember.nickname.Equals(nickname.Text.Trim()) && cmember.email.Equals(Email.Text.Trim()))
            {
                cmember.u_password = BLL.Security.MD5("123456");
                System.Web.HttpContext.Current.Session[BLL.CMember.LoginUserSessionKey] = cmember;
                if (BLL.CMember.Update(cmember) > 0)
                {
                    if (NtHelp.SendGetMobPassMail(cmember.email, cmember.nickname,"123456"))
                    {
                        alertmessageAndGo("邮件已发送到您的邮箱，请查收！", "/Default.aspx");
                        return;
                    } 
                }
            }
            else
            {
                alertmessageAndGoback("用户名和邮箱有误！");
            }
        
        }
    }
}